<form class="layui-form" id="contactsForm" action="/apps/contacts/dyn/save.html" method="post" data-toggle="ajax-form"  data-target="#ukefu_contacts_dy" style="width: 100%;height: 100%;" enctype="multipart/form-data">
	<#if contacts??><input type="hidden" name="id" value="${contacts.id!''}"></#if>
	<div class="row" style="border-bottom: 1px solid #EFEFEF;">
		<div class="col-lg-12" style="padding-left:0px;padding-right:0px;">
			<div id="ukefu-contactsdy">
				<div class="ukefu-workorders-comment" id="ukefu-contacts-comment">
					<#if orderCommentList?? && orderCommentList.content?size gt 0>
					<#include "/apps/business/contacts/include/dynlist.html">	
					</#if>
				</div>
			</div>
			
			
			<h1 class="site-h1" style="border-top:1px solid #e6e6e6;margin-top:15px;">
				回复
			</h1>
			<div class="row" style="margin-top:5px;">
				<div class="col-lg-12" style="padding-left:0px;line-height:30px;padding-right:0px;padding-left:75px;">
					<textarea name="content" id="content" style="width:100%;height:60px;"></textarea>	
				</div>
			</div>
			<div class="row" style="margin-top:5px;">
				<div class="col-lg-12" style="padding-left:0px;line-height:30px;padding-right:0px;padding-left:75px;">
					<div class="layui-form-item">
						<div class="layui-input-block ukefu-form-block" style="margin-left:0px;">
							<div class="layui-box layui-upload-button">
								<input type="file" name="files"
									accept="*"
									class="layui-upload-file"
									onchange="$(this).closest('.layui-form-item').append($(this).closest('.ukefu-form-block').prop('outerHTML'));$(this).closest('.ukefu-form-block').find('.file_ad').html($(this).val());$(this).closest('.ukefu-form-block').find('.file_del').show();"><span
									class="layui-upload-icon"><i class="layui-icon">&#xe608;</i>上传附件</span>
							</div>
							<span>
								<span class="file_ad"></span>
								<span class="file_del" style="display:none;">
									<a href="javascript:void(0)" style="margin-left:10px;" onclick="$(this).closest('.ukefu-form-block').remove();">
							  			<i class="layui-icon" style="color:red;">&#x1006;</i>
							  			删除
							  		</a>
								</span>
							</span>
						</div>
					</div>	
				</div>
			</div>
			<div class="layui-button-block" style="margin-top:20px;margin-left:75px;text-align:left;">
				<button class="layui-btn" lay-submit="" lay-filter="formDemo">立即提交</button>
				<button type="reset" class="layui-btn layui-btn-primary">重置</button>
			</div>
		</div>
	</div>
</form>
<script>
	$(document).ready(function() {
		layui.use('form', function() {
			var form = layui.form;
			form.render(); //更新全部
		});
		$('#workDetailsTab li a').on("click" , function(){
			$('#workDetailsTab li').removeClass("layui-this");
			$(this).parent().addClass("layui-this");
		});
		
		layui.use(['flow'], function(){
		  	var element = layui.element ;
		  	var flow = layui.flow;
			flow.load({
			    elem: '#ukefu-contactsdy' //指定列表容器
			    ,done: function(page, next){ //到达临界点（默认滚动触发），触发下一页
			      $.get('/apps/contacts/dynlist.html?contactsid=${contacts.id!''}&p='+page, function(res){
			        //假设你的列表返回在data集合中
			        
			        //执行下一页渲染，第二参数为：满足“加载更多”的条件，即后面仍有分页
			        //pages为Ajax返回的总页数，只有当前页小于总页数的情况下，才会继续出现加载更多
			        next($('#ukefu-contacts-comment').append(res) , $(res).length > 0);    
			      });
			    }
			});
		});
		KindEditor.ready(function(K) {
			K.create('#content', {
				themeType : 'simple',
				width:"100%",
				resizeType:0,
				uploadJson : "/res/image/upload.html",
				items : ['fontname', 'fontsize', '|', 'forecolor', 'hilitecolor', 'bold', 'italic', 'underline',
						 'removeformat', '|', 'justifyleft', 'justifycenter', 'justifyright', 'insertorderedlist',
						 'insertunorderedlist', '|', 'emoticons', 'image', 'link'],
	            allowFileManager : false,
				fontsize:16
			});
		});
		KindEditor.options.cssData = "body { font-size: 15px; font-family:'Microsoft Yahei', 'Helvetica', 'Simsun', 'Arial';}";
	});
</script>